From: Keir Fraser Date: Tue, 10 Jun 2008 12:49:02 +0000 (+0100) Subject: libxc: Update for NetBSD X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14200^2~63 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=deb36502454d30eff815e09a0ade1c732366ff4c;p=xen.git libxc: Update for NetBSD returns hypercall return value when ioctl was successful. Signed-off-by: Christoph Egger --- diff --git a/tools/include/xen-sys/NetBSD/privcmd.h b/tools/include/xen-sys/NetBSD/privcmd.h index d670b41475..1296b30e5f 100644 --- a/tools/include/xen-sys/NetBSD/privcmd.h +++ b/tools/include/xen-sys/NetBSD/privcmd.h @@ -36,6 +36,7 @@ typedef struct privcmd_hypercall { unsigned long op; unsigned long arg[5]; + long retval; } privcmd_hypercall_t; typedef struct privcmd_mmap_entry { diff --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c index 81c86d1064..036f64879c 100644 --- a/tools/libxc/xc_netbsd.c +++ b/tools/libxc/xc_netbsd.c @@ -142,9 +142,13 @@ static int do_privcmd(int xc_handle, unsigned int cmd, unsigned long data) int do_xen_hypercall(int xc_handle, privcmd_hypercall_t *hypercall) { - return do_privcmd(xc_handle, + int error = do_privcmd(xc_handle, IOCTL_PRIVCMD_HYPERCALL, (unsigned long)hypercall); + if (error) + return error; + else + return (hypercall->retval); } #define EVTCHN_DEV_NAME "/dev/xenevt"